package com.jvm.example.chapter0206;

/**
 * Created by 357070 on 2016/11/8.
 */
public class StringTest {
    public static void main(String[] args) {
        String s1 = "ab";
        String s2 = "a";
        String s3 = s2 + "b";
        String s4 = "a" + "b";

        System.out.println(s1.intern() == s3);
        System.out.println(s1.intern() == s4);
        System.out.println(s3 == s4);
    }
}
